use std::cell::RefCell;

#[derive(Debug)]
#[allow(dead_code)]
struct Book{
    name:String,
    author:String,
    content:RefCell<String>,
}

impl Book{
    fn append_content(&self,con:&str){
        self.content.borrow_mut().push_str(con);
    }
}
fn main(){
    let book = Book{
        name:"Rust编程之道".to_string(),
        author:"lzfHope".to_string(),
        content:RefCell::new("努力学习，战胜AI".to_string()),
    };
    book.append_content(",这是新时代的程序员应有的素养。");
    println!("{:?}",book);
}